import { TimeUtils } from "great-jsutils";
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
const __filenameNew = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filenameNew);

function createUserApi(app) {
    app.get("/user/field/list", function (req, res) {
        fs.readFile(__dirname + "/" + "user.json", "utf8", function (err, data) {
            let datas = JSON.parse(data);
            res.send(JSON.stringify(datas.fieldList));
        });
    });
}
export { createUserApi };
